<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Ajax extends CI_Controller {

	public function index()
	{
            $this->load->model('articles');
            $articles = $this->articles->get_last_ten_entries();
           // $this->load->view('admin',$articles);
            $this->smarty->assign('articles',json_decode(json_encode($articles),true));
            $this->smarty->view('admin.tpl');
	}
}